#include "ODN_InputBindingMgr.h"

namespace ouden {

CInputBindingMgr::CInputBindingMgr()
{
	//ctor
	
	//NULL all the initial key bindings
	for (int i=0;i<256;++i) {
		m_pKeyEventBindings[i].pDownEvent = 0;
		m_pKeyEventBindings[i].pUpEvent = 0;
		m_pKeyEventBindings[i].pPressEvent = 0;
	}
	
}

CInputBindingMgr::~CInputBindingMgr()
{
	//dtor
	
	//Delete all of the bound events
	for (int i=0;i<256;++i) {
		if (m_pKeyEventBindings[i].pDownEvent)
			delete m_pKeyEventBindings[i].pDownEvent;
		if (m_pKeyEventBindings[i].pUpEvent)
			delete m_pKeyEventBindings[i].pUpEvent;
		if (m_pKeyEventBindings[i].pPressEvent)
			delete m_pKeyEventBindings[i].pPressEvent;
	}
	
}

} //namespace ouden
